Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve host header even with extra trusted root certificates #1526

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

chrismilson
Copy link

@chrismilson chrismilson commented Apr 3, 2023

Checklist

  • The title of the PR is clear and informative
  • If applicable, the changes made in the PR have proper test coverage
  • Issues addressed by the PR are mentioned in the description followed by Fixes.

Description

  • Add a new boolean annotation /override-backend-hostname;
  • When defined, determines whether the backend host header should be overwritten or not;
  • When undefined, falls back to original behaviour of using the value of Trusted Root Certificates.

Fixes

#1520

@chrismilson chrismilson changed the title Preserve host header Preserve host header even with extra trusted root certificates Apr 3, 2023
@chrismilson
Copy link
Author

@microsoft-github-policy-service agree

@chrismilson
Copy link
Author

Not sure how to get the Merge Builds check to succeed - error message is pretty non-descriptive.

httpSettings.PickHostNameFromBackendAddress = to.BoolPtr(true)
if overrideBackendHostName, err := annotations.OverrideBackendHostName(backendID.Ingress); err == nil {
if httpSettings.HostName != nil && !overrideBackendHostName {
// TODO Warn about pointless setting of hostname
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what the best way to implement this warning would be. Help would be appreciated.

The new annotation corresponds to the "Override with new host name"
option in the backend settings blade in the Azure Portal.
@chrismilson
Copy link
Author

@akshaysngupta @alxyzc Could I please get a review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant